package com.example.test.service.责任连;

public class StartChina {

    private AbstractBean first;
    private AbstractBean next;

    public void addHandle(AbstractBean next) {
        if (this.first == null) {
            this.first = next;
            this.next = next;
            return;
        }
        this.next.setNext(next);
        this.next = next;
    }

    public void handle() {
        if (first !=null) {
            first.start();
        }
    }

}
